package com.zone.sdk.module.comment;

import com.zone.sdk.common.http.ICloudService;
import com.zone.sdk.common.http.base.BaseRequest;
import com.zone.sdk.common.http.base.Result;
import com.zone.sdk.module.comment.base.CommentPage;
import com.zone.sdk.module.comment.entity.AppCommentScoreEntity;
import com.zone.sdk.module.comment.entity.CommentEntity;
import com.zone.sdk.module.comment.entity.CommentListEntity;
import com.zone.sdk.module.comment.entity.RecommendListEntity;
import com.zone.sdk.module.comment.entity.SearchResultEntity;
import com.zone.sdk.module.comment.request.AppSearchRequest;
import com.zone.sdk.module.comment.request.CommentDetailRequest;
import com.zone.sdk.module.comment.request.CommentListRequest;
import com.zone.sdk.module.comment.request.CommentScoreRequest;
import com.zone.sdk.module.comment.request.RecommendListRequest;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;

public interface ICloudCommentService extends ICloudService {


    /**********************************搜索、评论模块*********************************************/

    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("ser/index/search/v1")
    Observable<Result<CommentPage<SearchResultEntity>>> indexSearch(@Body AppSearchRequest request);

    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("cmm/comment/commentScore/v1")
    Observable<Result<AppCommentScoreEntity>> commentScore(@Body CommentScoreRequest request);

    /**
     * 应用评论列表
     * @param request
     * @return
     */
    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("cmm/comment/commentList/v1")
    Observable<Result<CommentListEntity>> commentList(@Body CommentListRequest request);

    //用户评论列表
    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("cmm/comment/userCommentList/v1")
    Observable<Result<CommentListEntity>> commentUserCommentList(@Body CommentListRequest request);

    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("comment/commentDetail")
    Observable<Result<CommentEntity>> commentDetail(@Body CommentDetailRequest request);

    /**********************************安利墙*********************************************/

    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("cmm/comment/initAmwayWallList/v1")
    Observable<Result<RecommendListEntity>> commentInitAmwayWallList(@Body RecommendListRequest request);

//    @Headers({"Content-Type: application/json;charset=utf-8",
//            "Accept: application/json;charset=utf-8"})
//    @POST("ser/comment/initAmwayWallList/v1")
//    Observable<Result<PageResult<RecommendEntity>>> recommendList(@Body RecommendListRequest request);

    /************************************************************************************/




    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("comment/editComment")
    Observable<Result<Result>> commentEditComment(@Body BaseRequest request);


    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("comment/editReply")
    Observable<Result<Result>> commentEditReply(@Body BaseRequest request);

    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("comment/commentPraise")
    Observable<Result<Result>> commentCommentPraise(@Body BaseRequest request);

    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("comment/initCommentDetail")
    Observable<Result<Result>> commentInitCommentDetail(@Body BaseRequest request);

    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("comment/updateComment")
    Observable<Result<Result>> commentUpdateComment(@Body BaseRequest request);




    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("comment/delUserComment")
    Observable<Result<Result>> commentDelUserComment(@Body BaseRequest request);

    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("comment/searchCommentCount")
    Observable<Result<Result>> commentSearchCommentCount(@Body BaseRequest request);

    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("feedback/feedbackCommit")
    Observable<Result<Result>> feedbackFeedbackCommit(@Body BaseRequest request);
}
